//package com.example.alex_zhang.myapplication;
//
//import android.app.Activity;
//import android.os.Bundle;
//import android.widget.ImageView;
//import android.widget.LinearLayout;
//
//import java.io.ByteArrayOutputStream;
//import java.io.IOException;
//import java.io.InputStream;
//
//public class CustomActivity extends Activity {
//
//    LinearLayout ll_decodeimages;
////    GifFrame gifFrame = null;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_custom);
//        ll_decodeimages = (LinearLayout) findViewById(R.id.ll_decodeimages);
//        showGif2();
//    }
////    void showGif()
////    {
////        // 解析gif动画
////        gifFrame = GifFrame.createGifImage(fileConnect(this.getResources().openRawResource(R.drawable.b10)));
////        int size = gifFrame.size();
////        for(int i=0;i<size;i++)
////        {
////
////            ImageView iv_image = new ImageView(CustomActivity.this);
////            iv_image.setPadding(5, 5, 5, 5);
////            LayoutParams lparams = new LayoutParams(100,100);
////            iv_image.setLayoutParams(lparams);
////            iv_image.setImageBitmap(gifFrame.getImage());
////            ll_decodeimages.addView(iv_image);
////            gifFrame.nextFrame();
////        }
////    }
//
////    Handler handler = new Handler()
////    {
////
////        @Override
////        public void handleMessage(Message msg) {
////            switch(msg.what)
////            {
////            case 1:
////                Bitmap bmp = (Bitmap) msg.obj;
////                if(bmp!=null)
////                {
////                    ImageView iv_image = new ImageView(CustomActivity.this);
////                    iv_image.setImageBitmap(bmp);
////                    ll_decodeimages.addView(iv_image);
////                }
////                break;
////            }
////        }
////
////    };
//    /**
//     * 独立线程解码gif图片
//     * @author huqiang
//     *
//     */
////    class DecodeGif implements Runnable
////    {
////        Context mContext ;
////        Handler mHandler;
////        public DecodeGif(Context context,Handler handler)
////        {
////            this.mContext = context;
////            this.mHandler = handler;
////        }
////        @Override
////        public void run() {
////            //开始解析gif
////            // 解析gif动画
//////            gifFrame = GifFrame.createGifImage(fileConnect(this.getResources().openRawResource(R.drawable.test)));
////        }
////        public void start()
////        {
////            new Thread(this).start();
////        }
////    }
//    // 读取文件
//
//
//}